package com.kmxd.ams.client.system.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 单位信息表
 *
 * @author ZuoLG
 * @since 2022-07-14
 */
@Data
@Schema(description = "单位信息表对象")
public class SysCropVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  @Schema(description = "名称 非空")
  private String name;

  @Schema(description = "缩写")
  private String shortName;

  /** 编码 非空、不可重复且全局唯一 */
  @Schema(description = "编码 非空、不可重复且全局唯一")
  private String code;

  @Schema(description = "父节点id 自关联，顶级默认0")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long parentId;

  @Schema(description = "层级 公司与部门分别从0开始")
  private Integer level;

  @Schema(description = "id路径 （例如：集团的path：/1/   股份的path：/1/2/   软件的path：/1/2/3/）")
  private String pathCode;

  @Schema(description = "name路径（例如：集团的path：/集团/   股份的path：/集团/股份/   软件的path：/集团/股份/软件/）")
  private String pathName;

  @Schema(description = "数据源配置")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long datasource;

  @Schema(description = "三员开关状态 0：未启，1：启用")
  private Boolean divide;

  @Schema(description = "下级单位授权数")
  private Long subCropNum;

  @Schema(description = "备注")
  private String remarks;

  @Schema(description = "排序")
  private Integer sort;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;
}
